<template>
	<div id='app'>
	<div id="login_new">
	    <div class="fill_word">
			<p>
			    收货人姓名
			</p>
	            <div class="phone">
	                <div class="am-form-group">
						<input type="text"v-model ="fd.urname" placeholder="请输入收货人姓名"/>
						<div align="center">
						<span id="userspan"></span>
						</div>
	                </div>
	                <div class="clear"></div>
	            </div>
					<p>
					    收货人地址
					</p>
				<div class="phone">
				    <div class="am-form-group">
						<input type="text" v-model ="fd.address" placeholder="请输入收货人地址"/>
						<div align="center" id="test_email"></div>
				    </div>
					<div class="clear"></div>
					</div>
					<p>
					    收货人手机号
					</p>
	        <div class="fill_num">
	            <div class="fill am-form-group">
					<input type="text" name="input" v-model ="fd.urphone" placeholder="请输入收货人手机号" />
	            </div>
	            <div class="clear"></div>
	        </div>
	        <input type="submit" @click="submit()" class="yes" value="保存"></input>
	    </div>
	</div>
	</div>
</template>

<script>
	import config from '@/config'
	export default {
		data() {
			return {
				usr:'',
				pwd:'',
				active:{},
				fd:{
					urname:"",
					urphone:"",
					address:""
				},
				vid:'',
			}
		},
		onLoad(option){
			if(option.id){
				this.vid = option.id;
			}
			var that = this;
			uni.request({
				url: `${config.baseUrl}/active/one?token=` + uni.getStorageSync('token') + '&id=' + that.vid,
				method: 'GET',
				success(r) {
					if (r.data.succ) {
							that.active = r.data.data;
					} else {
					
					}
				},
					complete(res){
						if(res.data && res.data.msg){
							uni.showToast({
								icon:'none',
								title:res.data.msg
							})
						}
					},
			});
		},
		methods: {
			itemClicked:function(item){
					uni.navigateTo({
						url:'offen_user?id='+this.vid
					})
			},
			submit:function(){
				uni.request({
					url: `${config.baseUrl}/comment/ret?token=` + uni.getStorageSync('token'),
					method: 'POST',
					data:this.fd,
					success(r) {
						if (r.data.succ) {
							
						} 
					},
					complete(res){
						if(res.data && res.data.msg){
							uni.showToast({
								icon:'none',
								title:res.data.msg
							})
						}
					},
				});
			},
	
		}
	}
</script>

<style>
</style>
